2024-08-12 12:26:47
An explanation of how SQL attacks occur and how to defend against them.
SQL injection attacks occur when an input field is able to be escaped allowing for direct execution of user defined queries.
Having an age field that doesn't check if the input is an integer or contains special characters is one example where this can occur. Protection can be as simple as checking if it's a valid number prior to running the SQL command, or better yet, creating pre-made queries when using a language like PHP.